package org.fin.minicat.responce;

import org.fin.minicat.protocol.HttpStatusCode;

import java.nio.charset.Charset;

public class HttpResponceHeader {

  private String contentType;

  private int contentLength;

  private String protocol;

  private HttpStatusCode statusCode;

  private Charset charset;

  @Override
  public String toString() {
    return protocol + " " + statusCode.toString() + " \n" +
           "Content-Type: " + contentType + "; charset=" + charset.toString() + " \n" +
           "Content-Length: " + contentLength + " \n" +
           "\r\n";
  }

  public String getContentType() {
    return contentType;
  }

  public void setContentType(String contentType) {
    this.contentType = contentType;
  }

  public int getContentLength() {
    return contentLength;
  }

  public void setContentLength(int contentLength) {
    this.contentLength = contentLength;
  }

  public String getProtocol() {
    return protocol;
  }

  public void setProtocol(String protocol) {
    this.protocol = protocol;
  }

  public HttpStatusCode getStatusCode() {
    return statusCode;
  }

  public void setStatusCode(HttpStatusCode statusCode) {
    this.statusCode = statusCode;
  }

  public Charset getCharset() {
    return charset;
  }

  public void setCharset(Charset charset) {
    this.charset = charset;
  }
}
